package com.gu.enumeration;

/**
 * @ProjectName: apartment-management-center
 * @Package: com.gu.enumeration
 * @ClassName: UserStatusEnum
 * @Author: gusongliao
 * @Description: 用户状态枚举  用户状态：0——封禁，1——正常
 * @createDate 2021/02/25 17:21
 */
public enum UserStatusEnum {
    BAN(0,"封禁"),
    NORMAL(1,"正常");

    private Integer status;
    private String msg;

    UserStatusEnum(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static String getUserStatus(Integer status){
        for (UserStatusEnum value : UserStatusEnum.values()) {
            if (value.status .equals(status)){
                return value.msg;
            }
        }
        return "";
    }

}
